Devices that display ladder programs include, for example, tablet terminals. Tablet terminals include terminals that automatically detect whether they are oriented in portrait orientation or landscape orientation and switch the display screen in accordance with the direction in which the terminals are orientated (orientation).
For example, when a tablet terminal has a rectangular display screen, if the tablet terminal is oriented in portrait orientation, the display screen of the tablet terminal serves as a portrait-oriented display screen, and if the tablet terminal is oriented in landscape orientation, the display screen of the tablet terminal serves as a landscape-oriented display screen. Such a tablet terminal displays a ladder program horizontally so that the ladder program extends in the horizontal direction regardless of whether the tablet terminal is oriented in portrait orientation or landscape orientation. Specifically, when the tablet terminal is oriented in portrait orientation, the ladder program is written horizontally so that the ladder program extends in the lateral direction of the display screen. When the tablet terminal is oriented in landscape orientation, the ladder program is written horizontally so that the ladder program extends in the longitudinal direction of the display screen. In this manner, the tablet terminal changes the direction in which the ladder program is displayed with respect to the display screen on the basis of the result of detecting whether it is oriented in portrait orientation or landscape orientation.